package com.wanxi.generictype;

public class ArrayType {
    public static void main(String[] args) {
        Integer[] intArray = {1, 2, 3, 4, 5};
        Double[] doubleArray = {1.1, 2.2, 3.3, 4.4};
        Character[] charArray = {'H', 'E', 'L', 'L', 'O'};

        ArrayType.runArray(doubleArray);//数组使用泛型，只能是包装类，不能是基本数据类型

    }

    public static <E> void runArray(E[] array) {
        for (E element : array) {

            System.out.print(element + " ");

        }
    }
}
